<div class="comment rounded-corners">
	<span class="author">
		<g:link controller="user" action="show" id="${commentInstance?.createdBy?.id}">${commentInstance?.createdBy?.alias}</g:link>
	</span>
	
	<div class="navButtons">
		<usr:isAdmin>
			<span>
				<g:formRemote name="deleteForm" update="commentWrapper" url="[controller:'comment', action:'delete', params:[id:commentInstance?.id, 'commentToId':commentToId, 'commentToName':commentToName]]">
					<g:actionSubmit class="delete" action="delete" value="${message(code:'default.button.delete')}" onclick="return confirm('${message(code:'default.label.delete.confirm')}');"/>
				</g:formRemote>
			</span>
			<g:if test="${commentInstance?.disabled}">
				<span>
					<g:formRemote name="enableForm" update="commentWrapper" url="[ controller:'comment', action:'enable', params:[id:commentInstance?.id, 'commentToId':commentToId, 'commentToName':commentToName]]">
						<g:submitButton name="enable" class="enable" value="${message(code:'default.button.enable')}" />
					</g:formRemote>
				</span>
			</g:if>
			<g:else>
				<span>
					<g:formRemote name="disableForm" update="commentWrapper" url="[ controller:'comment', action:'disable', params:[id:commentInstance?.id, 'commentToId':commentToId, 'commentToName':commentToName]]">
						<g:submitButton name="disable" class="disable" value="${message(code:'default.button.disable')}" />
					</g:formRemote>
				</span>
			</g:else>
		</usr:isAdmin>
		
		<span title="${message(code:'default.button.down')}">
			${commentInstance?.down}
			<g:formRemote name="sja4" update="commentWrapper" url="[ controller:'comment', action:'voteDown', params:[id:commentInstance?.id, 'commentToId':commentToId, 'commentToName':commentToName]]">
				<g:submitButton name="down" class="voteDown" value=""  />
					
			</g:formRemote>
		</span>                    
		<span title="${message(code:'default.button.up')}">
			${commentInstance?.up}
			<g:formRemote name="sja4" update="commentWrapper" url="[ controller:'comment', action:'voteUp', params:[id:commentInstance?.id, 'commentToId':commentToId, 'commentToName':commentToName]]">
				<g:submitButton name="up" class="voteUp" value="" />
			</g:formRemote>
		</span>
		
		<span title="${message(code:'default.button.moderation.request')}">
			<g:formRemote name="moderationRequest" update="commentWrapper" url="[ controller:'comment', action:'moderationRequest', params:[id:commentInstance?.id, 'commentToId':commentToId, 'commentToName':commentToName]]">
				<g:submitButton name="moderationRequest" class="moderationRequest" value="" />
			</g:formRemote>
		</span>
	</div>
	
		<!--<div style="background-color:red; width:40px; height:40px; position:relative; float:left;">
			${fieldValue(bean: commentInstance, field: "id")}
		</div>
		<div style="background-color:red; width:40px; height:40px; position:relative; float:right;">
			<g:formatDate format="dd-MM-yyyy" date="${commentInstance?.dateCreated}" />
			<g:formatDate format="dd-MM-yyyy" date="${commentInstance?.lastUpdated}" />
		</div>
	--><div class="contenido">
		${commentInstance?.text}
	</div>
</div>
